Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASSETS-35923 create .cloudmanager/java-version for cloud projects, min jdk11 #1175

Merged
merged 4 commits into from
Mar 12, 2024

Conversation

adamcin
Copy link
Contributor

@adamcin adamcin commented Mar 10, 2024

Projects created for cloud should be expected to build with a minimum jdk version of 11.

Description

  • create .cloudmanager/java-version for cloud projects with text content 11, per Setting the Maven JDK Version
  • change the maven-enforcer-plugin rule for java-version to require version 11 instead of 1.8
  • create a it-java8 profile that changes the archetype.test.projectsDirectory when executed with jdk 1.8 to point to a new sibling folder projects-1_8 containing symbolic links to non-cloud IT project directories, so that the archetype project itself continues to build successfully for both jdk1.8 and jdk11 executions.

Related Issue

ASSETS-35923 Release 15262 aem-sdk-api breaks the sample unit tests in aem-project-archetype projects when running under JDK8, including new sandbox programs

Motivation and Context

Upstream project dependencies of AEM are gradually moving to Java 11+ targets, which are compatible with the AEM Cloud Service runtime, but not compatible with the default Cloud Manager JDK version 1.8. Until the minimum supported version of AEM on AMS/On-Prem is raised above 1.8, the archetype should extend its conditional logic for cloud vs non-cloud to govern the required JDK version as well, so that cloud projects and the cloud SDK can evolve more cohesively.

How Has This Been Tested?

Executed the archetype locally under jdk 1.8 and jdk 11 to confirm that the tests pass and that the aemVersion=cloud IT projects contain a .cloudmanager/java-version file with the contents 11 and that they fail early if they are built with jdk 1.8.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@adamcin adamcin changed the title create .cloudmanager/java-version for cloud projects, min jdk11 ASSETS-35923 create .cloudmanager/java-version for cloud projects, min jdk11 Mar 10, 2024
@adamcin
Copy link
Contributor Author

adamcin commented Mar 10, 2024

@buuhuu please track this for review

@kwin
Copy link
Contributor

kwin commented Mar 11, 2024

Usually you use property maven.compiler.release to affect both m-compiler-p and m-javadoc-p at the same time

@buuhuu buuhuu added this to the 48 milestone Mar 12, 2024
@buuhuu buuhuu self-requested a review March 12, 2024 12:41
@buuhuu buuhuu merged commit 72a123a into adobe:develop Mar 12, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants